In a page report/RDL report, group your data from a on fields and expressions. Each data region provides grouping in a different way.
Use the steps below to learn how to set groups in each data region. These steps assume that you have already added a Page Report/RDL Report template and connected it to a data source. See Adding an ActiveReport to a Project, Connect to a Data Source and Add a Dataset for more information.
|
Note: This topic uses examples from the Movie table in the Reels database. By default, in ActiveReports, the Reels.mdb file is located at [User Documents folder]\GrapeCity Samples\ActiveReports 9\Data\Reels.mdb. |
To set grouping in a Table
To group data in a Table data region, add group header and footer rows to the table or set detail grouping.
To add groups in a Table
- From the Visual Studio toolbox, drag and drop a Table data region onto the .
- With the Table selected on the report, under the Properties window, click the Property dialog link to open the Table dialog.
- In the table dialog that appears go to the Groups page and click the Add (+) button to add a group manually.
- In this dialog, on the General tab, under Group on enter the field name or expression on which you want to group the data. For e.g., =Fields!YearReleased.Value.
|
Note: A default group name like Table1_Group1 appears under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
- Under the Document map label, you can optionally set a label to add the item to the document map. See Document Map for further information.
- Under Parent group, you can optionally set the parent group for a recursive hierarchy.
- Click OK to close the dialog. Group header and group footer rows appear right above and below the table details row.
- Drag and drop fields onto the Table data region and in the group header row, add the field on which the grouping is set.
- Preview the report to see the result.
|
Tip: You can sort, filter, set page breaks or repeat headers for your grouped data in the other tabs of the Table-Groups dialog. |
To set detail grouping in a Table
Detail Grouping is useful when you do not want to repeat values within the data on display in the report.
- From the Visual Studio toolbox, drag and drop a Table data region onto the .
- With the Table selected on the report, under the Properties Window, click the Property dialog link to open the Table dialog > Detail Grouping page.
- In the Detail Grouping page, under Group on enter the expression on which you want to group the data. For e.g., =Fields!YearReleased.Value
|
Note: A default group name like Table1_Detail_Group1 appears under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
- Under the Document map label, you can optionally set a label to add the item to the document map. See Document Map for further information.
- Under Parent group, you can optionally set the parent group for a recursive hierarchy.
- Click OK to close the dialog.
- Drag and drop fields onto the Table data region and go to the to see grouped data.
|
Tip: You can filter, set page breaks or set visibility for your grouped data in the other tabs of the Table-Detail Grouping page. |
To set detail grouping in a List
To group data in a List data region, set detail grouping. Detail Grouping is useful when you do not want to repeat values within the data on display in the report.
- From the Visual Studio toolbox, drag and drop a List data region onto the .
- With the List selected on the report, under the Properties window, click the Property dialog link to open the List dialog > Detail Grouping page.
- In the Detail Grouping page, under Group on enter the expression on which you want to group the data. For e.g., =Fields!YearReleased.Value.
|
Note: A default group name like List1_Detail_Group appears under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
- Under the Document map label field, you can optionally set a label to add the item to the document map. See Document Map for further information.
- Under the Parent group field, you can optionally set the parent group for a recursive hierarchy.
- Click OK to close the dialog.
- Drag and drop fields or other data regions onto the List data region and go to the to see grouped data.
|
Tip: You can place lists within lists to create nested grouping. You can also filter, set page breaks or set sorting for your grouped data in the other tabs of the List-Detail Grouping page. |
To set grouping in a BandedList
To group data in a BandedList data region, add the BandedList group header and footer row.
- From the Visual Studio toolbox, drag and drop a BandedList data region onto the .
- Right-click the BandedList data region and select Insert Group to open the Banded List-Groups dialog.
OR
With the BandedList selected on the report, under the Properties Window, click the Property dialog link to open the Banded List dialog > Groups page. However, you have to click the Add (+) button and add the group manually in this case.
- In the Groups page, under Group on enter the field name or expression on which you want to group the data. For e.g., =Fields!YearReleased.Value.
|
Note: A default group name like BandedList1_Group1 appears under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
- Under the Document map label field, you can optionally set a label to add the item to the document map. See Document Map for further information.
- Under Parent group you can set the parent group for a recursive hierarchy.
- Click the OK to close the dialog.
- Drag and drop fields onto the BandedList data region and go to the to see grouped data.
To set grouping in a Matrix
To group data in a Matrix data region, set row and column groups dynamically or manually in the data region.
To dynamically group a matrix using dynamic columns and rows
- From the Visual Studio toolbox, drag and drop a Matrix data region onto the .
- From the Report Explorer, drag a field and drop it onto a row or column header in the matrix. This action adds both an expression to the textbox in the cell and a grouping to the matrix.
- From the Report Explorer, drag and drop a field onto the aggregate detail cell of the matrix data region.
To manually group a matrix using dynamic columns and rows
- From the Visual Studio toolbox, drag and drop a Matrix data region onto the .
- Right-click a row or column header and choose Insert Group. This adds a new cell below the original column header or to the right of the original row header.
- In the Matrix - Column Groups or Row Groups dialog that appears, under Group on enter an expression on which you want to group the data. For e.g., =Fields!YearReleased.Value.
- Click OK to close the dialog.
- Drag and drop or set fields in the aggregate detail cell of the matrix data region and go to the Preview Tab to view the result.
Or
- From the Visual Studio toolbox, drag and drop a Matrix data region onto the .
- With the Matrix data region selected on the report, under the Properties Window, click the Property dialog link to open the Matrix dialog.
- In the Column Groups or Row Groups page, click the Add button to add a new group and a new cell below the original column header or to the right of the original row header.
- Enter an expression under Group on on which you want to group the data. For e.g., =Fields!YearReleased.Value.
- Click OK to close the dialog.
- Drag and drop or set fields in the aggregate detail cell of the matrix data region and go to the Preview Tab to view the result.
|
Note: A default group name like Matrix1_RowGroup1 or Matrix1_ColumnGroup1 appears under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
To set grouping in a Chart
To group data in a Chart data region, set grouping for categories or series. In a Chart, you can set groups directly on the design surface or add category groups and series groups manually.
To dynamically group a Chart category or series
- From the Visual Studio toolbox, drag and drop a Chart data region onto the .
- From the Report Explorer,
- Drag a field near the lower edge of the Chart and drop it onto the part that reads Drop category fields here. This action groups the categorized chart data on the field set here.
- Drag a field near the upper edge of the Chart and drop it onto the part that reads Drop data fields here. This adds data which is to be grouped to the chart.
- Drag a field near the right edge of the Chart and drop it onto the part that reads Optionally drop series fields here. This action groups data on series.
To manually group a Chart category or series
-
From the Visual Studio toolbox, drag and drop a Chart data region onto the .
- With the Chart data region selected on the report, under the Properties Window, click the Chart Data link to open the Chart Data dialog.
- In the Chart Data dialog, go to the Category Groups page and click the Add button to add a new group.
- Enter an expression under Group on on which you want to categorize the data. For e.g., =Fields!Title.Value.
- In the Chart Data dialog, go to the Series Groups page and click the Add button to add a new group.
- Enter an expression under Group on on which you want to group your series data. For e.g., =Fields!Country.Value.
- Click OK to close the dialog.
- Drag the UserRating field near the upper edge of the Chart and drop it onto the part that reads, Drop data fields here. This adds data which is to be grouped to the chart.
|
Note: A default group name like Chart1_CategoryGroup1 or Chart1_SeriesGroup1 appear under Name, until you set the grouping expression under Group On, after which you can modify the group name. |
See Also